package com.chinapost.po;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Tkind entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TKIND", schema = "YXJF")
public class Tkind implements java.io.Serializable {

	// Fields

	private Integer cid;
	private String cname;
	private Set<Tyxjl> tyxjls = new HashSet<Tyxjl>(0);
	private Set<Tyxsj> tyxsjs = new HashSet<Tyxsj>(0);
	private Set<Tycsj> tycsjs = new HashSet<Tycsj>(0);
	private Set<Tjfsz> tjfszs = new HashSet<Tjfsz>(0);
	private Set<Ttqsj> ttqsjs = new HashSet<Ttqsj>(0);

	// Constructors

	/** default constructor */
	public Tkind() {
	}

	/** minimal constructor */
	public Tkind(Integer cid, String cname) {
		this.cid = cid;
		this.cname = cname;
	}

	/** full constructor */
	public Tkind(Integer cid, String cname, Set<Tyxjl> tyxjls, Set<Tyxsj> tyxsjs, Set<Tycsj> tycsjs, Set<Tjfsz> tjfszs, Set<Ttqsj> ttqsjs) {
		this.cid = cid;
		this.cname = cname;
		this.tyxjls = tyxjls;
		this.tyxsjs = tyxsjs;
		this.tycsjs = tycsjs;
		this.tjfszs = tjfszs;
		this.ttqsjs = ttqsjs;
	}

	// Property accessors
	@Id
	@Column(name = "CID", unique = true, nullable = false, precision = 5, scale = 0)
	public Integer getCid() {
		return this.cid;
	}

	public void setCid(Integer cid) {
		this.cid = cid;
	}

	@Column(name = "CNAME", nullable = false, length = 30)
	public String getCname() {
		return this.cname;
	}

	public void setCname(String cname) {
		this.cname = cname;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tkind")
	public Set<Tyxjl> getTyxjls() {
		return this.tyxjls;
	}

	public void setTyxjls(Set<Tyxjl> tyxjls) {
		this.tyxjls = tyxjls;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tkind")
	public Set<Tyxsj> getTyxsjs() {
		return this.tyxsjs;
	}

	public void setTyxsjs(Set<Tyxsj> tyxsjs) {
		this.tyxsjs = tyxsjs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tkind")
	public Set<Tycsj> getTycsjs() {
		return this.tycsjs;
	}

	public void setTycsjs(Set<Tycsj> tycsjs) {
		this.tycsjs = tycsjs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tkind")
	public Set<Tjfsz> getTjfszs() {
		return this.tjfszs;
	}

	public void setTjfszs(Set<Tjfsz> tjfszs) {
		this.tjfszs = tjfszs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tkind")
	public Set<Ttqsj> getTtqsjs() {
		return this.ttqsjs;
	}

	public void setTtqsjs(Set<Ttqsj> ttqsjs) {
		this.ttqsjs = ttqsjs;
	}

}